/*
 * CDamageType.java
 * 
 * Copyright (c) 2009 Giles Millward (Manigra). All rights reserved.
 * 
 * This file is part of JRogueDPS.
 * 
 * JRogueDPS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * JRogueDPS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with JRogueDPS.  If not, see <http://www.gnu.org/licenses/>.
 */

package dpsstats;

/**
 *
 * @author Giles Millward (Manigra)
 */
public class CDamageType {
    private int m_count;
    private double m_damage;

    CDamageType()
    {
        m_count = 0;
        m_damage = 0.0;
    }

    public void reset()
    {
        m_count = 0;
        m_damage = 0.0;
    }

    public void add(CDamageType p_damageType)
    {
        m_count += p_damageType.m_count;
        m_damage += p_damageType.m_damage;
    }

    public void addCount()
    {
        m_count++;
    }

    public void addCount(int p_number)
    {
        m_count += p_number;
    }

    public void addDamage(double p_damage)
    {
        m_damage += p_damage;
        m_count++;
    }

    public int getCount()
    {
        return m_count;
    }

    public double getDamage()
    {
        return m_damage;
    }

    public void divideBy(int p_divisor)
    {
            m_count /= p_divisor;
            m_damage /= p_divisor;
    }
}
